import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import MainConsole from '../components/MainConsole.vue'
import Machine from '../components/Machine.vue'

// 定义路由规则
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'main',
    component: MainConsole
  },
  {
    path: '/machine',
    name: 'machine',
    component: Machine
  }
]

// 创建路由实例
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

// 导出路由实例
export default router
